<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>后台管理面板</title>
  <!-- 告诉浏览器该页面是自适应布局 -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
   {include file="index/top" /}
</head>
<body class="hold-transition skin-blue sidebar-mini">	
<div class="wrapper">
    <div class="content-wrapper" style="margin-left: 0 !important;">
        <!--页眉-->
        <section class="content-header">
          <h1>邮箱配置</h1>
        </section>
        <!--内容开始-->
        <section class="content">
        	<div class="search">
            	<form class="form-inline">
                 	<e>邮件采用SMTP方式发送</e>
                </form> 
            </div>
            <!--数据表开始-->
            <div class="row">
                <div class="col-xs-12">
                  <div class="box">
                    <div class="box-header">
                    <!-- /.box-header -->
                    <div class="box-body no-padding">
                    	<form method="post" action="{:url('emailPost')}"> 
                    		<!---->
			                	<div class="row dd_input_group">
				                	<div class="form-group">
					                  <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">服务器</label>
					                  <div class="col-xs-8 col-sm-6 col-md-4 col-lg-4">
					                    <input type="text" name="smtp_server" class="form-control" placeholder="SMTP服务器" value="{$info.smtp_server}">
					                  </div>
					                </div>
				                </div>
				                <!---->	
				                <div class="row dd_input_group">
				                	<div class="form-group">
					                  <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">SMTP端口</label>
					                  <div class="col-xs-8 col-sm-6 col-md-4 col-lg-4">
					                    <input type="text" name="smtp_port" class="form-control" placeholder="SMTP端口" value="{$info.smtp_port}">
					                  </div>
					                </div>
				                </div>
				                <!---->	
				                <div class="row dd_input_group">
				                	<div class="form-group">
					                  <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">发件人</label>
					                  <div class="col-xs-8 col-sm-6 col-md-4 col-lg-4">
					                    <input type="text" name="email_id" class="form-control" placeholder="发件人" value="{$info.email_id}">
					                  </div>
					                </div>
				                </div>
				                <!---->	
				                <div class="row dd_input_group">
				                	<div class="form-group">
					                  <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">发件邮箱</label>
					                  <div class="col-xs-8 col-sm-6 col-md-4 col-lg-4">
					                    <input type="text" name="smtp_user" class="form-control" placeholder="发件邮箱" value="{$info.smtp_user}">
					                  </div>
					                </div>
				                </div>
				                <!---->
				                <div class="row dd_input_group">
				                	<div class="form-group">
					                  <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">身份验证码</label>
					                  <div class="col-xs-8 col-sm-6 col-md-4 col-lg-4">
					                    <input type="password" name="smtp_pwd" class="form-control" placeholder="身份验证码" value="{$info.smtp_pwd}">
					                  </div>
					                </div>
				                </div>
				                <!---->
				                <div class="row dd_input_group">
				                	<div class="form-group">
					                  <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">测试邮箱</label>
					                  <div class="col-xs-8 col-sm-6 col-md-4 col-lg-4">
					                    <input type="text" name="test_eamil" class="form-control" placeholder="测试邮箱" value="{$info.test_eamil}">
					                  </div>
					                </div>
				                </div>
				                <!---->
				                <div class="row dd_input_group">
	                        <div class="form-group">
	                          <div class="col-xs-12 col-sm-8 col-md-6 col-lg-5">
	                          <label class="text-lable">测试邮件内容</label>
	                          <textarea class="form-control" name="test_eamil_info" rows="3" placeholder="测试邮件内容">{$info.test_eamil_info}</textarea>
	                          </div>
	                        </div>
	                    	</div>
	                    	<!---->
	                    	<div class="row dd_input_group">
				                	<div class="form-group">
					                  <div class="col-xs-12 col-sm-8 col-md-6 col-lg-5 text-center">
					                    	<button type="submit" class="btn btn-flat btn-primary ">提 交</button> 
					                    	<button type="reset" class="btn btn-flat btn-default">重置</button>
					                    	<button type="button" id="test_email" class="btn btn-flat btn-info ">测试发送</button> 
					                  </div>
			
					                </div>
				                </div>
	                    <!---->
                			</form>
                    </div>
                    <!-- /.box-body -->
                  </div>
                  <!-- /.box -->
                </div>
              </div>
            <!--数据表结束-->
        </section>
        <!-- right col -->
      </div>
      <!-- /.row (main row) -->

    </section>
        <!--内容结束-->
    </div>
</div>
{include file="index/bottom" /} 
<script type="text/javascript">
	$("#test_email").click(function(){
		var url = "{:url('trySend')}";
		var email = $("input[name='test_eamil']").val();
		trySend(url,email);
	})
</script>
</body>
</html>    